

package com.io.controller;

import com.io.entity.SysUserEntity;
import org.apache.shiro.SecurityUtils;

/**
 * The class/interface Controller公共组件
 *
 * @author guodd
 * @version 1.0 use jdk 1.8
 */
public class BaseController {
    public static SysUserEntity getUser() {
        return (SysUserEntity) SecurityUtils.getSubject().getPrincipal();
    }

    public static Long getUserId() {
        return getUser().getUserId();
    }

    public static Long getDeptId() {
        return getUser().getDeptId();
    }
}
